<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditCondicoesCompraTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditCondicoesCompraLabel_idCondicoesCompra}" for="idCondicoesCompra" />
                    <h:inputText id="idCondicoesCompra" value="#{condicoesCompraController.selected.idCondicoesCompra}" title="#{bundle.EditCondicoesCompraTitle_idCondicoesCompra}" required="true" requiredMessage="#{bundle.EditCondicoesCompraRequiredMessage_idCondicoesCompra}"/>
                    <h:outputLabel value="#{bundle.EditCondicoesCompraLabel_observacao}" for="observacao" />
                    <h:inputTextarea rows="4" cols="30" id="observacao" value="#{condicoesCompraController.selected.observacao}" title="#{bundle.EditCondicoesCompraTitle_observacao}" required="true" requiredMessage="#{bundle.EditCondicoesCompraRequiredMessage_observacao}"/>
                    <h:outputLabel value="#{bundle.EditCondicoesCompraLabel_condicaoPagamento}" for="condicaoPagamento" />
                    <h:selectOneMenu id="condicaoPagamento" value="#{condicoesCompraController.selected.condicaoPagamento}" title="#{bundle.EditCondicoesCompraTitle_condicaoPagamento}" required="true" requiredMessage="#{bundle.EditCondicoesCompraRequiredMessage_condicaoPagamento}">
                        <f:selectItems value="#{condicaoPagamentoController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditCondicoesCompraLabel_compra}" for="compra" />
                    <h:selectOneMenu id="compra" value="#{condicoesCompraController.selected.compra}" title="#{bundle.EditCondicoesCompraTitle_compra}" required="true" requiredMessage="#{bundle.EditCondicoesCompraRequiredMessage_compra}">
                        <f:selectItems value="#{compraController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{condicoesCompraController.update}" value="#{bundle.EditCondicoesCompraSaveLink}"/>
                <br />
                <br />
                <h:commandLink action="View" value="#{bundle.EditCondicoesCompraViewLink}" immediate="true"/>
                <br />
                <h:commandLink action="#{condicoesCompraController.prepareList}" value="#{bundle.EditCondicoesCompraShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.EditCondicoesCompraIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
